import {
  http
} from '@/utils/http.js'

/**
 * 获取所有区域
 */
export function getAllAreaAPI() {
  return http({
    url: '/district/all',
    method: "GET",
  })

}

/**管理员处理申请
 * @param {Object} data
 */
export function auditSubAPI(data) {
  return http({
    url: '/authentication',
    method: "POST",
    data
  })

}

/**
 * 获取工单详情
 */
export const getOrderApi = (orderId, page) => {
  return http({
    url: `/orderPart/get/${orderId}/page/${page}}`,
  })
}

/**
 * 改变工单状态
 */
export const updateOrderStatusAPI = (id) => {
  return http({
    url: '/order/next',
    method: 'POST',
    data: {
      id
    }
  })
}



/**
 * 维修员设置模块  -----更改维修员工作状态
 */
export const updateRepairStateAPI = (state) => {
  return http({
    url: `/user/employee/updateState?state=${state}`,
    method: 'post'
  })
}
